package com.roadmap.entities;

import com.roadmap.common.BaseEntity;

public class Comment extends BaseEntity {
	// mapping to the table fields
	private String entryType;
	private String typeId;
	private String content;
	private String authorId;
	
	// extended properties
	private String authorName;
	private String hostId;

	public String getEntryType() {
		return entryType;
	}

	public void setEntryType(String entryType) {
		this.entryType = entryType;
	}

	public String getTypeId() {
		return typeId;
	}

	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAuthorId() {
		return authorId;
	}

	public void setAuthorId(String authorId) {
		this.authorId = authorId;
	}

	public String getAuthorName() {
		return authorName;
	}

	public void setAuthorName(String authorName) {
		this.authorName = authorName;
	}

	@Override
	public String getWhatItIs() {
		if(getContent()!= null && getContent().length() > DESP_MAX_LENGTH){
			return getContent().substring(0, DESP_MAX_LENGTH) + "...";
		}
		return getContent();
	}

	public String getHostId() {
		return hostId;
	}

	public void setHostId(String hostId) {
		this.hostId = hostId;
	}
	
	
}
